package com.watereast;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class ReadTxt {
    public static void main(String[] args) throws IOException {
        String fileTxt = "C:\\Users\\nietao-002\\Desktop\\0914.txt";
        try {
            FileReader fileReader = new FileReader(fileTxt);
            BufferedReader bufferedReader = new BufferedReader(fileReader);
            ArrayList<String> list = new ArrayList<>();
            String line;
            while ((line = bufferedReader.readLine()) != null) {
                System.out.println(line);
                list.add(line);
            }
            System.out.println(line);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
